1. Field of the Invention
The present invention relates to a barrel shifter, and particularly to a barrel shifter to be mounted on a LSI for a microprocessor for producing efficient wiring and having a compact composition as compared with conventional ones.
2. Description of the Prior Art
Generally, any of customary barrel shifters has a low-level-input resistor, a high level-input resistor, a barrel-shifter main unit, and a bus driver. The low-level-input resistor has a predetermined number of low-level-input-bit lines and width substantially defined by wiring width of the lines, and the high-level-input resistor has high level-input-bit lines of the same number as the low-level-input-bit lines and width substantially the same as the low-level-input resistor. Both the input resistors are arranged by the input side of the main unit, and the bus driver is arranged by the output side thereof.
Conventionally, the circuit width of the input side of the main unit for wiring from both the input resistors is wider than the circuit width of the output side thereof for wiring to the bus driver, so that the main unit and the other compositional elements arranged at either side of the main unit are disorder in the respective circuit width for wiring, and hence wiring for the entire circuit of a barrel sifter becomes complicated and a dead space is caused.
In order to clarify the defects of conventional barrel shifters, the operational principle is now described.
FIG. 1 is a schematic view for explaining operation of a barrel shifter.
In the left-shift operative mode, data to be shifted are set in a low-level-input resistor 1, and all zeros are set as shift-in data in a high-level-input resistor. By such selling, for example, a resultant output shifted by 2 bits in the left direction can be obtained at a main unit 3.
Similarly, the right-shift operation of the barrel shifter is shown in FIG. 2. In the right-shift operative mode, all zeros or coded numbers of MSB(the highest bit) are set as shift-in data in the low-level-input resistor 1, and data to be shifted are set in the high-level-input resistor 2. By such setting, for example, a resultant output shifted by 2 bits in the right direction can be obtained at the main unit bits in the right direction can be obtained at the main unit 3.
One of a conventional barrel shifter for effecting such shift operation is shown in FIG. 3. In the drawing, there are shown a low-level-input resistor 1, a high-level-input resistor 2 and a barrel-shifter main unit 3, and reference numeral 4 designates a bus driver.
The low-level-input resistor 1 and the high-level-input resistor 2 are respectively provided with low-level-input-bit lines LB.sub.0 -LB.sub.31, connected to a low-level bus and high-level-input-bit lines HB.sub.0 -HB.sub.31, connected to a high-level bus, and their circuit width are respectively and substantially defined by wiring width of the respective input-bit lines.
In this case, the circuit width of the input side of the main unit 3 is corresponding to output from a total of 62 bits of both the low-level-input resistor 1 and the high-level-input resistor 2. On the other hand, the width of the output side of the main unit 3 is only corresponding to output of 32 bits having been shifted by a predetermined bit number.
Accordingly, in the entire compositioon of the conventional barrel shifter, as shown in FIG. 3, the input side of the main unit 3 is wider than the output side thereof, and hence a specific portion of the main unit 3, i.e., an area designated by oblique lines becomes a dead space.
Moreover, when the shifted output from the main unit 3 is outputted into low-level-output lines LB' or high-level-output lines HB' through the bus driver 4, a wiring area designated by reference character "A" in the drawing where wires to be wired in the circuit must be bent is inevitably required in the input side of the bus driver 4.
While, as shown in FIG. 4, when the barrel shifter is so composed that the low-level-input-bit lines LB.sub.0 -LB.sub.31 and the high-level-input-bit lines HB.sub.0 -HB.sub.31 are alternately arranged at the low-level-input resistor 1 and the high-level-input resistor 2 respectively, the width of the bus driver 4 can be reduced and the area where the wires must be bent can be avoided. However, in this case, as shown in FIG. 4, another area designated by reference character "A" in which wires to be wired must be similarly bent to the area .lambda. shown in FIG. 3 is inevitably required at the output side of the high-level-input resistor 2, thus efficient circuit wiring can not be performed even by the composition. Moreover, there also remains a dead space designated by oblique lines substantially similar to the one shown in FIG. 3.
As stated above, in the conventional barrel shifter, since the width of the input side of the main unit is wider than that of the output side of thereof, the area where the wires to be wired must be bent is inevitably required.